<!DOCTYPE html>
<html>
    <head>
        <meta charset="utf-8">
        <title>Vue.js 组件传值</title>
        
        <script src="../../../js/vue.js"></script>
    </head>
    <body>
        <div id="app">
            <son :msgfromfather="message"></son>
        </div>
        
        <script>
            var son = {
                props: ['msgfromfather'],
                template: '<h1>子组件收到：{{ msgfromfather }}</h1>'
            };

            new Vue({
                el: '#app',
                data: {
                    message: '来自父亲的信'
                },
                components: {
                    son     // 等价于 'son': son
                }
            });
        </script>
    </body>
</html>
